﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using ModbusLib;
using S7Lib;
using 多协议通信平台.Base;

namespace 多协议通信平台.ViewModels.Protocal
{
    public partial class S7ViewModel : BaseViewModel
    {
        private System.Timers.Timer timer;
        private S7Client Client;

        public S7ViewModel()
        {
            PageTitle = "S7通信";
        }

        [ObservableProperty]
        private string ip = "127.0.0.1";

        [ObservableProperty]
        private int port = 102;

        [ObservableProperty]
        private int rack = 0;

        [ObservableProperty]
        private int slot = 0;

        [ObservableProperty]
        private int recvTimeout = 6000;

        [ObservableProperty]
        private string connectionStatus = "未连接";

        [ObservableProperty]
        private bool connectStatus = false;

        [RelayCommand]
        private void Connect()
        {

        }

        [RelayCommand]
        private void UnConnect()
        {

        }
    }
}
